<template>
  <div>
    <lt-echarts :options="option" width="100%" hight="300px" />
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from 'vue'
import ltEcharts from '../../baseEcharts/ltEchart.vue'
export default defineComponent({
  components: {
    ltEcharts
  },
  props: {
    peiData: {
      type: Array
    }
  },
  setup(props) {
    const option = computed(() => {
      return {
        // legend: {
        //   top: 'bottom'
        // },
        toolbox: {
          show: true,
          feature: {
            mark: { show: true }
            //dataView: { show: true, readOnly: false },
            //restore: { show: true },
            //saveAsImage: { show: true }
          }
        },
        series: [
          {
            name: '面积模式',
            type: 'pie',
            radius: [15, 100],
            center: ['50%', '50%'],
            roseType: 'area',
            itemStyle: {
              borderRadius: 8
            },
            data: props.peiData
          }
        ]
      }
    })
    return {
      option
    }
  }
})
</script>

<style scoped></style>
